{include file=header.html}
<script type="text/javascript" src="{lib file=search_goods.js}" charset="utf-8"></script>
<script type="text/javascript">
var upimg   = '{res file=images/up.gif}';
var downimg = '{res file=images/down.gif}';
imgUping = new Image();
imgUping.src = upimg;

$(function(){
	$("#sort ul li").click(function(){
		//$("#sort ul").css("display","none");
		replaceParam('order', this.title);
        return false;
	});
	var title = '{$smarty.get.order}';
	if(title)
	{
		var arr = title.split(' ');
		if(arr[1]=='desc')
		{
			$("#sort b").addClass("desc");
		}
		else if(arr[1]=='asc')
		{
			$("#sort b").addClass("asc");
		}
		else
		{
			$("#sort b").addClass("none");
		}
		var txt = $("#sort ul li[title="+title+"]").text();
		$("#sort b").text(txt);
	}
	
	$("[ectype='ul_category'] dt").click(function(){
		$("[ectype='ul_category'] dt").each(function(){
			$("dl[ectype='ul_category']").removeClass("foc");
			$("dl[ectype='ul_category'] dt").removeClass("foc");
			$("dl[ectype='ul_category'] dd").removeClass("foc");
		});
		$(this).addClass("foc");
		$(this).parent().addClass("foc");
		$(this).next().addClass("foc");
	});
});
</script>


<div class="search w1200 clearfix">
	{include file=curlocal.html}
    <div class="content">
        <div class="left">            
                <div class="gcategory">
                    <h2><b>{$cate_name}</b></h2>
                    <div class="content" {if !$cate_name} style="border-top:1px solid #D5DCEE" {/if}>
                        <!--{foreach from=$cate item=category name=fe_category}-->
                        <dl class="clearfix pl10 {if $category.open}foc{/if}" ectype="ul_category">
                            <dt class="pl10 {if $category.open }foc{/if}"><a href="javascript:void(0);" id="{$category.cate_id}">{$category.cate_name|escape}</a></dt>
                           <dd  class="{if $category.open} foc {/if}">
                                <!--{foreach from=$category.child item=child}-->
                                <span><a href="javascript:void(0);" id="{$child.cate_id}" class="{if $smarty.get.cate_id==$child.cate_id} foc {/if}">{$child.cate_name|escape}</a></span>
                                <!--{/foreach}--> 
                           </dd> 
                        </dl>
                        <!--{/foreach}-->
                    </div>
                </div>
                <div class="hot_sale mt10">
                    <div class="title">热销排行 </div>
                    <ul class="clearfix">
                        <!--{foreach from=$hot_sales item=goods name=fe_goods}-->
                        <li class="clearfix">
                            <i class="foc">{$smarty.foreach.fe_goods.iteration}</i>
                            <a target="_blank" href="{url app=goods&id=$goods.goods_id}" title="{$goods.goods_name|escape}">
                            <img width="60" height="60" alt="{$goods.goods_name|escape}" src="{$goods.default_image}">
                            </a>
                            <div>
                                <p class="name"><a name="rcmd_trd_c1" target="_blank" href="{url app=goods&id=$goods.goods_id}" title="{$goods.goods_name|escape}">{$goods.goods_name|escape}</a></p>
                                <p class="price"><b>￥</b>{$goods.price}</p>
                            </div>
                        </li>  
                        <!--{/foreach}-->              
                    </ul>
                </div>
        </div>
    
        <div class="right clearfix">
            <div class="search_recom clearfix">
                <ul class="tab">
                    <li>本类推荐商品</li>
                </ul>
                <div class="carousel">
                  <div class="prev_next">
                    <a class="prev" href="javascript:;"></a>
                    <a class="next" href="javascript:;"></a> 
                  </div>
                  <div class="scroller">
                     <ul class="ks-content ks-switchable-content">
                        <!--{foreach from=$rec_list item=goods}-->
                        <li>
                            <a target="_blank" href="{url app=goods&id=$goods.goods_id}"><img width="100" height="100" src="{$goods.default_image}" alt="{$goods.goods_name|escape}"></a>
                            <div>
                                <span>
                                <a title="{$goods.goods_name|escape}" target="_blank" href="prd_10052_10051_-7_1211575_.html">{$goods.goods_name|escape}</a>
                                </span>
                                <p><b>￥</b>{$goods.price}</p>
                            </div>
                       </li>       
                        <!-- {/foreach} -->
                      </ul>
                    </div>
                 </div>
                <script>
                    KISSY.use("switchable", function(S) {
                    var tiny_slide = new S.Carousel('.carousel', {
                    steps:4,
                    effect: 'scrollx',
                    easing: 'easeOutStrong',
                    circular: true,
                    prevBtnCls: 'prev',
                    nextBtnCls: 'next',
                    disableBtnCls: 'disable',
                    interval:4,
                    aria:false,
                    autoplay:true,
                    lazyDataType: 'img-src' //延迟加载图片？
                    });
                    });
                </script>
            </div>
            <div class="module_filter">
                <div class="module_filter_line">
                    <div class="filterCond">商品筛选&nbsp;&nbsp;&nbsp;&nbsp;{if $filters}<a id="dorpall" title="{$smarty.get.cate_id}" href="javascript:void(0)">重置筛选条件</a>{/if}				                </div>
                    <!--{if $brands}-->
                    <div class="contain_list" ectype="dropdown_filter_content" ecvalue="brand">
                        <div class="title">{$lang.brand}:</div>
                        <ul ectype="ul_brand">
                            <!-- {if $filters.brand} -->
                            <li><a class="foc" href="javascript:void(0);" title="brand">{$filters.brand.value|escape}</a></li>
                            <!--{else}-->
                                <!--{foreach from=$brands item=row}-->
                                <li><a class="no" href="javascript:void(0);" title="{$row.brand}" id="{$row.brand|escape:url}">{$row.brand|escape} ({$row.count})</a></li>
                                <!--{/foreach}-->
                            <!--{/if}-->
                        </ul>
                    </div>
                    <!--{/if}-->
                    <!--{if $price_intervals || $filters.price}-->
                    <div class="contain_list" ectype="dropdown_filter_content" ecvalue="price">
                        <div class="title">{$lang.price}: </div>
                        <ul ectype="ul_price">
                            <!-- {if $filters.price} -->
                            <li><a class="foc" href="javascript:void(0);" title="price">{$filters.price.value}</a></li>
                            <!--{else}-->
                                <!--{foreach from=$price_intervals item=row}-->
                                <li><a class="no" href="javascript:void(0);" title="{$row.min} - {$row.max}">{$row.min|price} - {$row.max|price} ({$row.count})</a></li>
                                <!--{/foreach}-->
                             <!--{/if}-->
                        </ul>
                    </div>
                    <!--{/if}-->
                    <!--{if $regions}-->
                    <div class="contain_list" ectype="dropdown_filter_content" ecvalue="region">
                        <div class="title">{$lang.region}:</div>
                        <ul ectype="ul_region">
                            <!-- {if $filters.region_id} -->
                            <li><a class="foc" href="javascript:void(0);" title="region_id">{$filters.region_id.value|escape}</a></li>
                            <!--{else}-->
                                <!--{foreach from=$regions item=row}-->
                                <li><a class="no" href="javascript:void(0);" id="{$row.region_id}" title="{$row.region_name|escape}">{$row.region_name|escape} ({$row.count})</a></li>
                                <!--{/foreach}-->
                            <!--{/if}-->
                        </ul>
                    </div>
                    <!--{/if}-->
                </div>
            </div>
            <div class="shop_con_list">
                <div class="conditions">
                  <div class="bar clearfix">
                  	 <span class="floatl">
                         <a class="type" href="javascript:;" ectype="display_mode" ecvalue="list">切换到列表</a>
                         <a href="javascript:;" ectype="display_mode" ecvalue="squares" class="type square">切换到大图</a>
                         <div id="sort" class="mr10 clearfix">
                            <b title="{$smarty.get.order}">默认排序</b>
                            <ul>
                                <li class="desc" title="sales desc">销量从高到低</li>
                                <li class="desc" title="credit_value desc">信用度从高到低</li>
                                <li class="asc" title="price asc">价格从低到高</li>
                                <li class="desc" title="price desc">价格从高到低</li>
                                <li class="desc" title="views desc">按浏览量排序</li>
                                <li class="desc" title="add_time desc">按发布时间排序</li>
                                <li class="none" title="">默认排序</li>
                            </ul>
                            <i class="arrow"></i>
                         </div>
                         <span class="region">
                             {$lang.region}：
                             <select ectype="select_region">
                                <option value="">请选择</option>
                                <!--{foreach from=$regions item=row}-->
                                <option value="{$row.region_id}" title="{$row.region_name|escape}"{if $smarty.get.region_id==$row.region_id} selected="selected"{/if}>{$row.region_name|escape}</option>
                                <!--{/foreach}-->
                             </select>
                         </span>
                     </span>	
                      <!-- {if $goods_list} -->
                        {include file=page.top.html}
                     <!-- {/if} -->
                  </div>
               </div>
                <div class="{$display_mode}" ectype="current_display_mode">
                    <!-- {if $goods_list} -->
                    <div class="list_pic">
                        <!--{foreach from=$goods_list item=goods}-->
                        <dl>
                             <p><a hidefocus="true" href="{url app=goods&id=$goods.goods_id}" target="_blank"><img width="160" height="160" src="{$goods.default_image}" /></a></p>
                             <dt><a hidefocus="true" href="{url app=goods&id=$goods.goods_id}" target="_blank">{$goods.goods_name|escape|truncate:40}</a></dt>
                             <dd class="price">&yen; <em>{$goods.price}</em><span>最近成交 {$goods.sales|default:0} {$lang.unit}</span></dd>
                             <!--<dd class="opre"><a href="javascript:add_to_cart('',1);">购买</a><a href="javascript:collect_goods({$goods.goods_id});">收藏</a><a class="cart">加入购物车</a></dd>-->
                        </dl>
                        <!--{/foreach}-->
    
                        <div class="clear"></div>
                    </div>
                    <!-- {else} -->
                    <div class="no_results">{$lang.no_records}</div>
                    <!-- {/if} -->
                </div>
            </div>
            <!-- {if $goods_list} -->
             <div class="shop_list_page">
                    {include file=page.bottom.html}
                </div>
            <!-- {/if} -->
        </div>
    </div>

</div>
{include file=service.html}
{include file=footer.html}
